<template>
	<view class="home__container__info__user u-f-ac" @tap="toUserSapce">
		<image :src="item.userpic" mode="widthFix" class="home__container__info__user--pic" />
		<view class="home__container__info__user--body">
			<text class="home__container__info__user--body--nick">{{item.username}}</text>
			<view class="home__container__info__user--body--desc">
				<text>总访客 {{item.totalnum}}</text>
				<text>今日 {{item.todaynum}}</text>
			</view>
		</view>
		<text class="icon iconfont icon-arrow-down-s-line home__container__info__user--last"></text>
	</view>
</template>

<script setup>
	const props = defineProps({
		item: {
			type: Object,
			required: true,
		}
	})
	
	function toUserSapce(e){
		uni.navigateTo({
			url:"/pages/user-space/user-space",
		})
	}
	
</script>

<style lang="scss" scoped>
	.home__container__info__user {
		width: 100%;
		margin: 20upx 0;
		justify-content: space-between;

		>image {
			width: 100upx;
			height: 100upx;
			border-radius: 50%;
			margin-right: 20upx;
		}

		&--body {
			flex: 1;

			&--nick {
				font-size: 40upx;
				color: black;
				margin: 10upx;
			}

			&--desc {
				color: #bbb;
				font-size: 24upx;
				margin: 10upx 0;
			}
		}

		&--last {
			display: inline-block;
			transform: rotate(-90deg);
			font-size: 40upx;
		}
	}
</style>